package com.fowo.api.syncLingxingApi.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fowo.api.syncLingxingApi.entity.TmpSyncLingxingToWmsOrderList;
import com.fowo.api.syncLingxingApi.mapper.TmpSyncLingxingToWmsOrderListMapper;
import com.fowo.api.syncLingxingApi.service.TmpSyncLingxingToWmsOrderListService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
@DS("ds24")
public class TmpSyncLingxingToWmsOrderListServiceImpl
        extends ServiceImpl<TmpSyncLingxingToWmsOrderListMapper, TmpSyncLingxingToWmsOrderList>
        implements TmpSyncLingxingToWmsOrderListService {
    @Override
    public Integer updateTo(String version) {
        Integer rltCount = 0;
        rltCount += baseMapper.updateTo(version);
        rltCount += baseMapper.updateToItem(version);
        return rltCount;
    }

    @Override
    public Integer insertInto(String version) {
        Integer rltCount = 0;
        rltCount += baseMapper.insertInto(version);
        rltCount += baseMapper.insertIntoItem(version);
        return rltCount;
    }

    @Override
    public void clearAll(String version) {
        baseMapper.clearAll(version);
    }

    @Override
    public List<TmpSyncLingxingToWmsOrderList> getList(List<TmpSyncLingxingToWmsOrderList> list) {
        return baseMapper.getList(list);
    }
    public void updateFlag(String version) {
        baseMapper.updateFlag(version);
        baseMapper.updateFlag2(version);
    }
}
